package com.lakers.notice.springboot.monitor;

import org.springframework.core.env.Environment;

import java.util.Objects;

/**
 * 功能描述: MonitorSwitch
 *
 * @author liqin(zxl)
 * @date 2024/5/21
 */
public class MonitorSwitch {

    public static Boolean on(Environment env){
        final Boolean cond = env.getProperty("notice.monitor", Boolean.class);
        if (Objects.isNull(cond)){
            return Boolean.FALSE;
        }
        return cond;
    }
}
